#ifndef DATAPACKAGE_H
#define DATAPACKAGE_H

#include "Format.h"
#include <QString>
#include "winsock2.h"

class DataPackAge
{
private:
    u_int data_length;
    QString timeStmp;
    QString info;
    int package_type;
protected:
    static QString byteToSting(u_char *str, int size);
public:
    const u_char *pkt_content;

public:
    DataPackAge();
    void setDataLength(int data_length);
    void setTimeStamp(QString timeStamp);
    void setPackageType(int type);
    void setPointer(const u_char *pkt_content, int size);
    void setInfo(QString info);

    QString getDataLength();
    QString getTimeStamp();
    QString getPackageType();
    QString getInfo();
    QString byteToString(u_char *str, int size);

    QString getSource();
    QString getDestination();
    QString getDesMacAddr();
    QString getSrcMacAddr();
    QString getDesIpAddr();
    QString getSrcIpAddr();

    QString getMacType();
};

#endif // DATAPACKAGE_H
